package com.yq.cp.entity.common;

public enum ErrorCode {
    //鉴权
    QJ_1001(1001, "服务器繁忙,请再次登录"),
    QJ_1002(1002, "鉴权失败"),
    QJ_1003(1003, "参数错误"),


    //用户
    USER_1101(1101, "用户名和密码不能为空"),
    USER_1102(1102, "用户名或密码错误"),
    USER_1110(1110, "登录账户重复"),
    USER_1111(1111, "手机号重复"),

    //角色
    role_1201(1201, "角色不存在"),
    role_1202(1202, "角色名称重复"),


    //公司
    COMPANY_1301(1301, "请先添加公司默认角色"),
    COMPANY_1302(1302, "公司名称重复"),
    COMPANY_1304(1304, "手机号重复"),


    ERROR_500(500, "参数错误");

    private int code;
    private String msg;

    // 构造方法
    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
